Schnittstelle TextInfo

Alle Superschnittstellen:
Serializable

@JsonData public interface TextInfo extends Serializable
A model class for get some text information how the text, the position, the bounds etc. This class is for the public api available
  • Methodenübersicht

    Modifikator und Typ
    Methode
    Beschreibung
    Get the areas of the TextInfo.
    Returns the bounds of the whole text info, SCALED
    float[]
    Returns the width of all characters of the text in pixel
    double
    Returns the height in pixels
    String representation for the content
    int
    Get the pageIndex of the TextInfo
    double
    Get the rotation of this element in radians
    float
    Get the scale of the BaseTextInfo
    Returns the content of this text info
    com.inet.pdfc.model.ElementType
    Get the type of this element
    int
    Returns the width of a whitespace using the font in this TextInfoImpl with the size of this TextInfo multiplied by 20 and scaled.
    This is used to determine whether two succeeding chunks belongs to one word.
    double
    Returns the x-coordinate of the element
    double
    Returns the y-coordinate of the element
    boolean
    Get the left of the TextInfo
    void
    setScale(double scale)
    Re-scale the bounding-boxes of characters to the given scale.
    void
    setX(double x)
    x cooridnates in unscaled page
    void
    setY(double y)
    y cooridnates in unscaled page
  • Methodendetails

    • getAreas

      List<Rectangle2D> getAreas()
      Get the areas of the TextInfo. This are the scaled bounding boxes of the characters.
      Gibt zurück:
      the areas of the TextInfo
      Seit:
      4.0
    • getText

      String getText()
      Returns the content of this text info
      Gibt zurück:
      the content of this text info
      Seit:
      4.0
    • getX

      double getX()
      Returns the x-coordinate of the element
      Gibt zurück:
      the x to set, in unscaled page coordinates
      Seit:
      4.0
    • setX

      void setX(double x)
      x cooridnates in unscaled page
      Parameter:
      x - - the x to set, in unscaled page coordinates
      Seit:
      4.0
    • getY

      double getY()
      Returns the y-coordinate of the element
      Gibt zurück:
      the y-coordinate in unscaled page coordinates
      Seit:
      4.0
    • setY

      void setY(double y)
      y cooridnates in unscaled page
      Parameter:
      y - - the y to set, in unscaled page coordinates
      Seit:
      4.0
    • getHeight

      double getHeight()
      Returns the height in pixels
      Gibt zurück:
      the height in pixels
      Seit:
      4.0
    • isLeft

      boolean isLeft()
      Get the left of the TextInfo
      Gibt zurück:
      the left of the TextInfo
      Seit:
      4.0
    • getPageIndex

      int getPageIndex()
      Get the pageIndex of the TextInfo
      Gibt zurück:
      the pageIndex of the TextInfo
      Seit:
      4.0
    • getLabel

      String getLabel()
      String representation for the content
      Gibt zurück:
      a string representation for the content, never null
      Seit:
      4.0
    • getRotation

      double getRotation()
      Get the rotation of this element in radians
      Gibt zurück:
      the rotation of this element in radians
      Seit:
      4.0
    • getWhiteSpaceWidth

      int getWhiteSpaceWidth()
      Returns the width of a whitespace using the font in this TextInfoImpl with the size of this TextInfo multiplied by 20 and scaled.
      This is used to determine whether two succeeding chunks belongs to one word.
      Gibt zurück:
      the width of a whitespace or a fallback value if font has no whitespace.
      Seit:
      4.0
    • getBounds

      Rectangle2D getBounds()
      Returns the bounds of the whole text info, SCALED
      Gibt zurück:
      the bounds of the whole text info, SCALED
      Seit:
      4.0
    • getScale

      float getScale()
      Get the scale of the BaseTextInfo
      Gibt zurück:
      the scale of the BaseTextInfo
      Seit:
      4.0
    • setScale

      void setScale(double scale)
      Re-scale the bounding-boxes of characters to the given scale.
      Parameter:
      scale - the new scale
      Seit:
      4.0
    • getType

      com.inet.pdfc.model.ElementType getType()
      Get the type of this element
      Gibt zurück:
      the type of this element, not null
      Seit:
      4.0
    • getCharWidth

      float[] getCharWidth()
      Returns the width of all characters of the text in pixel
      Gibt zurück:
      the width of all characters of the text in pixel
      Seit:
      4.0